<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@include file="/WEB-INF/commit/head.jsp" %>


<div class="layui-body">
	<div style="padding: 15px;">角色管理</div>
	<div class="layui-btn-group rolemanager">
		<button class="layui-btn" data-type ="add">增加</button>
		<button class="layui-btn" data-type ="update">修改</button>
		<button class="layui-btn" data-type ="del" id="del">删除</button>
	</div>
	<div >
	
	
	</div>
	<table class="layui-table" id="roleTable">
		<!-- <colgroup>
			<col width="6%">
			<col width="8%">
			<col width="8%">
			<col width="15%">
			<col width="15%">
			<col>
		</colgroup>
		<thead>
			<tr>
				<th>选择</th>
				<th>角色编号</th>
				<th>角色名称</th>
				<th>创建人</th>
				<th>状态(启用/禁用)</th>
				<th>最后修改时间</th>
			</tr>
		</thead>
		<tbody id="tbody">
						    <tr>
			      <td><input type="radio" name="xuanzhe"/></td>
			      <td>sl_user01</td>
			      <td>会员</td>
			      <td>加盟店</td>
			      <td>sl_user03</td>
			      <td><input type="checkbox" name="zhuangtai"/></td>
			      <td>2013-12-26 15:04:01</td>
			    </tr>
		</tbody> -->
	</table>
</div>
<div>
<script  type="text/html" id="isstartTpl">
  <div class="layui-form-item">
	{{#  if(d.isstart == 0){ }}
      <input type="checkbox" name="like[0]" title="禁用" checked>
 	{{#  } else { }}
      <input type="checkbox" name="like[1]" title="启用" checked>
   {{#  } }}
  </div>
</script>
<form id="fm" style="display:none" class="layui-form"  action="role/add.html" method="post" enctype="multipart/form-data">
  <div class="layui-form-item">
    <label class="layui-form-label">角色编号</label>
    <div class="layui-input-block">
      <input type="text" name="rolecode" required  lay-verify="required" placeholder="请输入角色编号" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">角色名称</label>
    <div class="layui-input-block">
      <input type="text" name="rolename" required  lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">角色状态</label>
    <div class="layui-input-block">
      <input type="radio" name="isstart" value="1" title="启用" checked>
      <input type="radio" name="isstart" value="0" title="禁用" >
    </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo" id="btn">保存</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
</div>
<div>
<form id="fm_update" style="display:none" class="layui-form" lay-filter="roleUpdate" action="role/update.html">
	 <input type="hidden" id="id" name="id" value="">
  <div class="layui-form-item">
    <label class="layui-form-label">角色编号</label>
    <div class="layui-input-block">
      <input type="text" id="rolecode" name="rolecode" required  lay-verify="required" placeholder="请输入角色编号" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">角色名称</label>
    <div class="layui-input-block">
      <input type="text"id="rolename" name="rolename" required  lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">角色状态</label>
    <div class="layui-input-block">
      <input type="radio" name="isstart" value="0" title="禁用" >
      <input type="radio" name="isstart" value="1" title="启用">
    </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo" id="baocun">保存</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
</div>
<script src="./layer/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/addrole.js"></script>
<%@include file="/WEB-INF/commit/dibu.jsp" %>